using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using Animoso.Domain;
using Animoso.Domain.Data;

namespace Animoso.Web.Controllers
{
    public class FotoController : ApplicationController
    {
        private IRepository<Album> _albumRepository;
        private IRepository<Picture> _pictureRepository;

        public FotoController(IRepository<Album> albumRepository, IRepository<Picture> pictureRepository)
        {
            _albumRepository = albumRepository;
            _pictureRepository = pictureRepository;
        }

        public ActionResult Index()
        {
            return View(_albumRepository.GetAll());
        }

        public ActionResult Album(int id)
        {
            return View(_albumRepository.GetById(id));
        }

        public ActionResult Picture(int id)
        {
            return View(_pictureRepository.GetById(id));
        }
    }
}
